var http=require('http'),spawn=require('child_process').spawn;


http.createServer(function (req, res) {
    var child=spawn('node',['child.js']);

    child.stdout.pipe(res);

    res.on('end', function () {
        child.kill();
    });

}).listen(4000);

